/* 全局应用的二次元风格样式 */

/* 主页容器 */
.home-container {
    position: relative !important;
    min-height: 100vh !important;
    width: 100% !important;
    overflow-x: hidden !important;
    background-color: #fdf6fa !important;
}

/* 二次元背景 */
.anime-bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url('/src/assets/anime/anime-bg.png') !important;
    background-size: cover !important;
    background-position: center !important;
    opacity: 0.4 !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

/* 樱花飘落效果 */
.sakura-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 10 !important;
    overflow: hidden !important;
}

.sakura {
    position: absolute !important;
    width: 20px !important;
    height: 20px !important;
    background: url('/src/assets/anime/sakura.png') no-repeat center/cover !important;
    top: -20px !important;
    animation: falling linear infinite !important;
    opacity: 0.7 !important;
}

@keyframes falling {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* SVG图标样式 */
.icon-svg {
    vertical-align: middle !important;
    margin-right: 4px !important;
    display: inline-block !important;
}

.up-avatar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    margin-right: 4px !important;
    background-color: #f5f5f5 !important;
}

/* 看板娘容器 */
#live2d-widget {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    width: 300px !important;
    height: 300px !important;
    z-index: 9999 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.waifu {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    cursor: move !important;
}

.waifu-tips {
    position: absolute !important;
    top: -60px !important;
    width: 250px !important;
    height: auto !important;
    padding: 10px !important;
    border: 1px solid rgba(224, 186, 140, .62) !important;
    border-radius: 12px !important;
    background-color: rgba(236, 217, 188, .8) !important;
    box-shadow: 0 3px 15px 2px rgba(191, 158, 118, .2) !important;
    font-size: 14px !important;
    line-height: 24px !important;
    color: #333 !important;
    opacity: 0 !important;
    transition: opacity .3s !important;
    z-index: 9999 !important;
    word-break: break-all !important;
}

.waifu-tool {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 50px !important;
    right: 10px !important;
    opacity: 0 !important;
    transition: opacity .3s !important;
}

.waifu:hover .waifu-tool {
    opacity: 1 !important;
}

.icon-btn {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    cursor: pointer !important;
    color: #5c5c5c !important;
    text-align: center !important;
    line-height: 30px !important;
    transition: color .3s !important;
    margin-bottom: 10px !important;
}

.icon-btn:hover {
    color: #0684bd !important;
}

/* 视频列表项 */
.video-item {
    position: relative !important;
    transition: all 0.3s ease !important;
    z-index: 1 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.video-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    z-index: 2 !important;
}

.video-item:hover::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, rgba(255, 183, 221, 0.2) 0%, rgba(106, 90, 205, 0.2) 100%) !important;
    z-index: -1 !important;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-track {
    background: rgba(240, 240, 240, 0.5) !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb {
    background: rgba(106, 90, 205, 0.6) !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 90, 205, 0.8) !important;
}

/* 渐变按钮 */
.anime-button {
    background: linear-gradient(45deg, #6a5acd, #ff69b4) !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.anime-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4) !important;
}

.anime-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    transition: all 0.5s ease !important;
}

.anime-button:hover::before {
    left: 100% !important;
}

/* 导航菜单 */
.anime-nav {
    display: flex !important;
    gap: 10px !important;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border-radius: 30px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.anime-nav-item {
    padding: 8px 15px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.anime-nav-item:hover,
.anime-nav-item.active {
    background: linear-gradient(45deg, rgba(106, 90, 205, 0.7), rgba(255, 105, 180, 0.7)) !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

/* 弹幕容器 */
.danmu-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    overflow: hidden !important;
    z-index: 2 !important;
}

.danmu-item {
    position: absolute !important;
    white-space: nowrap !important;
    color: white !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
    animation: danmu-move linear !important;
    will-change: transform !important;
}

.danmu-item.fixed-top {
    top: 10% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    animation: danmu-fade 4s linear !important;
}

.danmu-item.fixed-bottom {
    bottom: 10% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    animation: danmu-fade 4s linear !important;
}

@keyframes danmu-move {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes danmu-fade {

    0%,
    100% {
        opacity: 0;
    }

    10%,
    90% {
        opacity: 1;
    }
}

/* 二次元字体 */
@font-face {
    font-family: 'AnimeFont';
    src: url('/src/assets/anime/fonts/anime-font.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

.anime-text {
    font-family: 'AnimeFont', sans-serif;
}

/* 分类导航 */
.main-page-channel-container {
    width: 1300px !important;
    margin: 0 auto !important;
    padding: 16px 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    position: relative !important;
    z-index: 3 !important;
}

.left-channel {
    margin-right: 48px !important;
}

.left-channel-recommend {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    background: linear-gradient(45deg, #ff69b4, #6a5acd) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3) !important;
    transition: all 0.3s !important;
}

.left-channel-recommend:hover {
    transform: translateY(-3px) rotate(5deg) !important;
    box-shadow: 0 6px 15px rgba(255, 105, 180, 0.4) !important;
}

.left-channel-recommend[data-icon="logo"]::before {
    content: '' !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    background: url('/src/assets/anime/logo.png') no-repeat center center !important;
    background-size: contain !important;
    margin-bottom: 2px !important;
}

.left-channel-recommend span {
    font-size: 12px !important;
    color: white !important;
    font-family: 'ZCOOL QingKe HuangYou', sans-serif !important;
}

.right-channel {
    width: calc(100% - 88px) !important;
    box-sizing: border-box !important;
    padding: 20px !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.right-channel-left {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    padding: 15px 0 !important;
    width: 100% !important;
}

.channel-item {
    padding: 8px 20px !important;
    margin: 8px 15px 8px 0 !important;
    border-radius: 20px !important;
    transition: all 0.3s ease !important;
    background-color: rgba(253, 231, 250, 0.8) !important;
    box-shadow: 0 3px 8px rgba(255, 105, 180, 0.2) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-align: center !important;
    font-weight: bold !important;
    font-size: 16px !important;
    color: #ff69b4 !important;
}

.channel-item:hover {
    background-color: rgba(255, 192, 203, 0.7) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(255, 105, 180, 0.3) !important;
    color: #fff !important;
}

.channel-item.active {
    background-color: #ff69b4 !important;
    color: white !important;
}

.sub-channel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    margin-top: 8px !important;
    width: 100% !important;
}

.sub-channel-item {
    padding: 5px 15px !important;
    margin: 5px 15px 5px 0 !important;
    border-radius: 15px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 2px 5px rgba(255, 105, 180, 0.15) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    color: #777 !important;
}

.sub-channel-item:hover {
    background-color: rgba(255, 228, 225, 0.9) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 5px rgba(255, 105, 180, 0.2) !important;
    color: #ff69b4 !important;
}

.sub-channel-item.active {
    background-color: #ffb6c1 !important;
    color: white !important;
}

/* 主视频容器区域 */
.main-page-video-container {
    width: 1300px !important;
    margin: 0 auto !important;
}

/* 图标修复 */
img[src^="@/assets/"] {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="pink"><circle cx="12" cy="12" r="10" /></svg>') !important;
}

/* 悬停效果增强 */
.video-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(255, 105, 180, 0.3) !important;
    transition: all 0.3s ease !important;
}

.thumbnail:hover {
    transform: scale(1.1) !important;
    transition: transform 0.5s ease !important;
}

/* 图标通用样式 */
.stat-item img,
.video-stats img,
.up-info img {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* 浮动樱花动画 */
@keyframes floatSakura {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: translateY(100px) rotate(180deg);
        opacity: 0.5;
    }

    100% {
        transform: translateY(200px) rotate(360deg);
        opacity: 0;
    }
}

.floating-element {
    position: absolute !important;
    width: 30px !important;
    height: 30px !important;
    background-image: url('/src/assets/anime/sakura.png') !important;
    background-size: cover !important;
    opacity: 0.8 !important;
    animation: floatSakura 15s linear infinite !important;
    z-index: 2 !important;
}

/* 自定义动画效果类 */
.anime-animated {
    animation-duration: 0.8s !important;
    animation-fill-mode: both !important;
}

.anime-fade-in {
    animation-name: animeFadeIn !important;
}

.anime-slide-up {
    animation-name: animeSlideUp !important;
}

.anime-slide-down {
    animation-name: animeSlideDown !important;
}

.anime-slide-left {
    animation-name: animeSlideLeft !important;
}

.anime-slide-right {
    animation-name: animeSlideRight !important;
}

.anime-bounce {
    animation-name: animeBounce !important;
}

.anime-pulse {
    animation-name: animePulse !important;
}

.anime-rotate {
    animation-name: animeRotate !important;
}

.anime-flip {
    animation-name: animeFlip !important;
    transform-style: preserve-3d !important;
}

/* 动画关键帧定义 */
@keyframes animeFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes animeSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes animeSlideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes animeSlideLeft {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes animeSlideRight {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes animeBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

@keyframes animePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes animeRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes animeFlip {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }

    40% {
        transform: perspective(400px) rotateY(-10deg);
    }

    70% {
        transform: perspective(400px) rotateY(10deg);
    }

    to {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

/* 二次元主题颜色变量 */
:root {
    --anime-primary: #ff69b4 !important;
    --anime-secondary: #6a5acd !important;
    --anime-accent: #00bfff !important;
    --anime-background: #f8f9fa !important;
    --anime-text: #333333 !important;
    --anime-light-text: #777777 !important;
    --anime-border: #e0e0e0 !important;
    --anime-shadow: rgba(106, 90, 205, 0.1) !important;
    --anime-gradient-1: linear-gradient(45deg, #ff69b4, #6a5acd) !important;
    --anime-gradient-2: linear-gradient(45deg, #00bfff, #6a5acd) !important;
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .sakura {
        width: 15px !important;
        height: 15px !important;
    }

    #live2d-widget {
        width: 200px !important;
        height: 200px !important;
        right: 10px !important;
        bottom: 10px !important;
    }

    .waifu {
        width: 200px !important;
        height: 200px !important;
    }
}